      <?=!empty($success) ? '<div class="alert alert-success">'.$success.'</div>' : '' ?>

      <?=anchor(site_url('cart/checkout'), 'Xem giỏ hàng') ?>
      <div class="row">
      <?php  foreach ($products as $product):  ?>
        <form action="<?=site_url('cart/create/'.$product['id']) ?>" method="post" class="form-horizontal" role="form">
        <div class="col-md-4">
          <h2><?=$product['title']; ?></h2>
          <p><?=$product['code'] ?></p>
          <img src="<?=base_url('uploads/image/products/'.$product['image']) ?>" class="img-responsive" alt="Responsive image" style="width:50%">
          <br>
          <div class="form-group">
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-3 control-label">Khách hàng</label>
              <div class="col-sm-5">
                <input type="text" id="exampleInputEmail2" class="form-control" name="customer" value="">
              </div>              
            </div>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-3 control-label">Số điện thoại</label>
              <div class="col-sm-5">
                <input type="text" id="exampleInputEmail2" class="form-control" name="phone-number" value="">
              </div>              
            </div>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-3 control-label">Địa chỉ</label>
              <div class="col-sm-5">
                <input type="text" id="exampleInputEmail2" class="form-control" name="address" value="">
              </div>              
            </div>
            <?php if($product['xs'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">xs</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="xs" value="">
              </div>
              <span class="badge"><?=$product['xs']; ?></span>
            </div>
            <?php endif; ?>
            <?php if($product['s'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">s</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="s" value="">
              </div>
              <span class="badge"><?=$product['s']; ?></span>
            </div>
            <?php endif; ?>
            <?php if($product['m'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">m</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="m" value="">
              </div>
              <span class="badge"><?=$product['m']; ?></span>
            </div>
          <?php endif; ?>
          <?php if($product['l'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">l</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="l" value="">
              </div>
              <span class="badge"><?=$product['l']; ?></span>
            </div>
          <?php endif; ?>
          <?php if($product['xl'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">xl</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="xl" value="">
              </div>
              <span class="badge"><?=$product['xl']; ?></span>
            </div>
          <?php endif; ?>
          <?php if($product['xxl'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">xxl</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="xxl" value="">
              </div>
              <span class="badge"><?=$product['xxl']; ?></span>
            </div>
          <?php endif; ?>
          <?php if($product['xxxl'] > 0): ?>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">xxxl</label>
              <div class="col-sm-3">
                <input type="text" id="exampleInputEmail2" class="form-control" name="xxxl" value="">
              </div>
              <span class="badge"><?=$product['xxxl']; ?></span>
            </div>
          <?php endif; ?>
          </div>          
          <p><button type="submit" name="addToCartBtn" value="addToCart" class="btn btn-primary" href="#" role="button">Add to cart</button></p>
        </div>
        </form>   
      <?php  endforeach;  ?>             
      </div>
     